import request from '@/utils/request'

// 查询工资项配置列表
export function listSalaryItemConfig(query) {
  return request({
    url: '/hrm/salaryItemConfig/list',
    method: 'get',
    params: query
  })
}

// 查询工资项配置详细
export function getSalaryItemConfig(id) {
  return request({
    url: '/hrm/salaryItemConfig/' + id,
    method: 'get'
  })
}

// 新增工资项配置
export function addSalaryItemConfig(data) {
  return request({
    url: '/hrm/salaryItemConfig',
    method: 'post',
    data: data
  })
}

// 修改工资项配置
export function updateSalaryItemConfig(data) {
  return request({
    url: '/hrm/salaryItemConfig',
    method: 'put',
    data: data
  })
}

/****
 * 根据类型修改状态
 * @returns {*}
 */
export function updateStatusByType(data){
    return request({
        url: '/hrm/salaryItemConfig/updateStatusByType',
        method: 'put',
        data: data
    })
}

// 删除工资项配置
export function delSalaryItemConfig(id) {
  return request({
    url: '/hrm/salaryItemConfig/' + id,
    method: 'delete'
  })
}



// 查询工资项配置详细
export function initSalaryItemConfig() {
    return request({
        url: '/hrm/salaryItemConfig/initSalaryItemConfig',
        method: 'post'
    })
}


//导出个人工资

